package com.google.code.mochaccino.framework.util;
/*
 * Copyright 2012 Claude Houle claude.houle@gmail.com
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

/** System Properties Definition */
public enum SystemProperties {

	FILE_SEPARATOR( "file.separator" ),
	JAVA_CLASS_PATH( "java.class.path" ),
	JAVA_CLASS_VERSION( "java.class.version" ),
	JAVA_COMPILER( "java.compiler" ),
	JAVA_EXT_DIRS( "java.ext.dirs" ),
	JAVA_HOME( "java.home" ),
	JAVA_IO_TEMP_DIR( "java.io.tmpdir" ),
	JAVA_LIBRARY_PATH( "java.library.path" ),
	JAVA_SPEC_NAME( "java.specification.name" ),
	JAVA_SPEC_VENDOR( "java.specification.vendor" ),
	JAVA_SPEC_VERSION( "java.specification.version" ),
	JAVA_VENDOR( "java.vendor" ),
	JAVA_VENDOR_URL( "java.vendor.url" ),
	JAVA_VERSION( "java.version" ),
	JAVA_VM_NAME( "java.vm.name" ),
	JAVA_VM_SPEC_NAME( "java.vm.specification.name" ),
	JAVA_VM_SPEC_VENDOR( "java.vm.specification.vendor" ),
	JAVA_VM_SPEC_VERSION( "java.vm.specification.version" ),
	JAVA_VM_VENDOR( "java.vm.vendor" ),
	JAVA_VM_VERSION( "java.vm.version" ),
	LINE_SEPARATOR( "line.separator" ),
	OS_ARCH( "os.arch" ),
	OS_NAME( "os.name" ),
	OS_VERSION( "os.version" ),
	PATH_SEPARATOR( "path.separator" ),
	USER_DIR( "user.dir" ),
	USER_HOME( "user.home" ),
	USER_NAME( "user.name" );

	private String property;

	private SystemProperties( String prop ) {
		this.property = prop;
	}

	@Override
	public String toString() {
		return getValue();
	}

	public String getValue() {
		return System.getProperty( property );
	}

	public void setValue( String v ) {
		System.setProperty( property, v );
	}

}